﻿using LayuiMvc.DataEntity.DataEntity;
using LayuiMvc.DataEntity.IdentityEntity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LayuiMvc.DataEntity.DataEntity
{
    /// <summary>
    /// 帖子回复实体类
    /// </summary>
    [Table("PostReply")]
    public class PostReplyEntity
    {
        /// <summary>
        /// 回复ID
        /// </summary>
        [Key]
        public int ReplyId { get; set; }

        /// <summary>
        /// 回复内容
        /// </summary>
        public string ReplyContent { get; set; }

        /// <summary>
        /// 回复内容的Html
        /// </summary>
        public string ReplyContentHtml { get; set; }

        /// <summary>
        /// 帖子Id
        /// </summary>
        [ForeignKey("Post")]
        public int PostId { get; set; }

        /// <summary>
        /// 关联Guid
        /// </summary>
        public Guid RelationGuid { get; set; }

        /// <summary>
        /// 回复时间
        /// </summary>
        public DateTime ReplyTime { get; set; }

        /// <summary>
        /// 是否被采纳
        /// </summary>
        public bool IsAccept { get; set; }
        /// <summary>
        /// 回复用户ID
        /// </summary>
        [ForeignKey("ReplyUser")]
        public int ReplyUserId { get; set; }

        /// <summary>
        /// 帖子
        /// </summary>
        public virtual PostEntity Post { get; set; }

        /// <summary>
        /// 回复用户
        /// </summary>
        public virtual IdentityUserEntity ReplyUser{ get; set; }
    }
}
